import {
	USER
} from '@/services/api'
import {
	request,
	METHOD
} from '@/utils/request'

/**
 * 用户列表
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function list(params) {
	return request(USER + "/list", METHOD.GET, params)
}

// 删除一个
export async function deleteOne(id) {
	return request(USER + "/delete", METHOD.POST, {
		adminId: id
	})
}

// 添加
export async function save(form) {
	return request(USER + "/save", METHOD.POST, form)
}

// 更新
export async function update(form) {
	return request(USER + "/update", METHOD.POST, form)
}
